package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

public class ParamsItem implements Sequenceable, Serializable {

    @SerializedName("value")
    private String value;
    
    @SerializedName("key")
    private String key;


    public static final Sequenceable.Producer<ParamsItem> CREATOR = new Producer<ParamsItem>() {
        @Override
        public ParamsItem createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            ParamsItem paramsItem = new ParamsItem();
            paramsItem.unmarshalling(parcel);
            return paramsItem;
        }
    };
    
    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.value);
        parcel.writeString(this.key);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.value=parcel.readString();
        this.key=parcel.readString();
        return true;
    }

    @Override
    public String toString() {
        return "ParamsItem{" +
                "value='" + value + '\'' +
                ", key='" + key + '\'' +
                '}';
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }
}
